Skip to content

scikit-build-core as build backend and pull the main branch of HGS-CVRP#33

Closed
mdealencar wants to merge 10 commits intochkwon:masterfrom
mdealencar:follow_upstream_and_new_build_backend
Closed

scikit-build-core as build backend and pull the main branch of HGS-CVRP#33
mdealencar wants to merge 10 commits intochkwon:masterfrom
mdealencar:follow_upstream_and_new_build_backend

Conversation

@mdealencar
Copy link
Contributor

Fixes #30.

PR #31 is a quick-fix for that issue, but the more robust solution is dropping setup.py entirely and making the build system more robust.

There is a caveat though: this PR only works with the main branch of HGS-CVRP, which merged the required upstream changes in CMakeLists.txt (vidalt/HGS-CVRP#49).

The HGS-CVRP changes from v2.0.0 to main involve a few extra args to AlgorithmParameters(), incorporated in PyHygese by this PR.

This will also bump version to 0.0.9.

@chkwon
Copy link
Owner

chkwon commented Mar 30, 2025

@mdealencar Thanks a lot for this PR!

Three requests:

  • Can we use a specific commit instead of just the main branch? 1a927955cd2861a29d978f0d359d6e647db9319c
  • The version needs to be 0.0.0.11 now.
  • CI.yml is failing due to the removal of setup.py Is the following line unnecessary now?
    python setup.py build

@chkwon chkwon requested a review from Copilot March 30, 2025 12:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the deprecated setup.py in favor of a modern pyproject.toml using scikit‑build‑core and updates algorithm parameters to work with the latest HGS‑CVRP changes from its main branch. Key changes include:

  • Dropping setup.py and switching to scikit‑build‑core in pyproject.toml.
  • Bumping the project version to 0.0.0.9.
  • Updating the AlgorithmParameters structure in hygese/hygese.py to incorporate new parameters required by upstream changes.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
setup.py Completely removed since the build system is transitioned to pyproject.toml with scikit‑build‑core.
pyproject.toml Introduced as the new build configuration, including a change in the required Python version and build backend settings.
hygese/hygese.py Updated the C structure and corresponding Python class to include additional algorithm parameters.
Files not reviewed (1)
  • CMakeLists.txt: Language not supported
Comments suppressed due to low confidence (2)

pyproject.toml:7

  • The required Python version has been changed from '>=3.6' (in setup.py) to '>=3.10'. Please confirm that this intentional update reflects the intended support for newer Python versions.
requires-python=">=3.10"

hygese/hygese.py:50

  • [nitpick] Consider renaming 'nbIterPenaltyManagement' to a more concise version (e.g., 'penaltyIter') for consistency with the other parameter names.
("nbIterPenaltyManagement", c_int),

@mdealencar
Copy link
Contributor Author

* Can we use a specific commit instead of just the main branch? `1a927955cd2861a29d978f0d359d6e647db9319c`

CMakeLists.txt was already referencing this commit, not main.

* The version needs to be `0.0.0.11` now.

Ok updated

* `CI.yml` is failing due to the removal of `setup.py`   Is the following line unnecessary now? https://github.com/chkwon/PyHygese/blob/2ca81ead6da2bb684217e7cd383eeffb05107e5b/.github/workflows/ci.yml#L46

Resolved. It uses python -m build now.

@mdealencar
Copy link
Contributor Author

mdealencar commented Mar 30, 2025

I've noticed you created a workflow for building wheels. I've succeeded in that already in the HybGebSea branch:

https://github.com/mdealencar/PyHygese/tree/HybGenSea

https://pypi.org/project/hybgensea/

I thought my PR here wasn't going anywhere and created a PyPI project to distribute wheels for my fork. I think there is no point in this redundancy if wheels for PyHygese are made available. I can make another PR with the cibuildwheel part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pip install hygese fails in Google Colab environment (missing build dependency 'cmake')

2 participants